home
lars.st0ne.at
Linux And Related Stuff
[BLOG] |ARCHIVE| |TAG MAP| |OTHER STUFF| |ME|
  • manage iso images on vsphere datastore using curl


    #curl #vmware #vshpere

    See below a easy method to manage (upload/download/delete) iso images on a VMWare datacenter datastore using curl.

    upload file:

    curl -k --user 'mydomain.local\myusername:supersecret' \
    --data-binary @./image.iso -X PUT \
    "https://vcenter/folder/customdir/image.iso?dcPath=MYDATACENTER&dsName=mydatastore"

    delete file:

    curl -k --user 'mydomain.local\myusername:supersecret' \
    -X DELETE \
    "https://vcenter/folder/customdir/image.iso?dcPath=MYDATACENTER&dsName=mydatastore"

    download file:

    curl -k --user 'mydomain.local\myusername:supersecret' \
    -X GET -o ./image.iso \
    "https://vcenter/folder/customdir/image.iso?dcPath=MYDATACENTER&dsName=mydatastore"
    Apr 07 2014 12:54
    by st0ne
    ? hits
    • comment @Twitter
    • share on Twitter
©2012 Robert Steininger aka st0ne
CC-BY-SA